package compile;

public enum EnumDemo {
    ADD {
        @Override
        public int calc(int a, int b) {
            return a + b;
        }
    },
    SUB {
        @Override
        public int calc(int a, int b) {
            return a - b;
        }
    };
    public abstract int calc(int a, int b);

    public static void main(String[] args) {
        System.out.println(ADD.calc(1, 2));
    }
}
